Created the play function