generalize adding of media