refactoring submit and media features