added insert method in Media class