def sum_fibs(limit):
    """Sums even Fibonacci numbers upto `limit`

    Args:
        limit (int) : The limit the sum will be calculated to

    Returns:
        int : The sum of even Fibonacci numbers upto `limit`
    """
    previous = 0
    current = 1
    future = 1
    result = 0

    while True:
        future = current + previous
        if future < limit:
            if future % 2 == 0:
                result += future
        else:
            break
        previous = current
        current = future

    return result