Separate function for undo play