moving the saving of the url to after the playback part