Refactored #play function