fibonacci refactored