Re-wrote playout()