added playing function