format functions.rb