rename type to mediatype