merge into api.rb