initial version of media POST and PUT, changed structure