slight refactor of play.rb