began to add media endpoint code