separated play function