add extractMedia method