refactored post request