added better support for application/json content type