changed post request handling