post request finished, next step, prettify code