refactoring of play activity