refactored fibonacci to cover two different use cases