finished fib's counter implementation