Started work on update_media function