fixed refactoring in functions.rb