refactor to use lib/utilities.rb