adding functions.rb