changed mimetype with content_type, and simplejson with json due to deprecation