Added logic in play controller