completely reimplemented post request. seems to work well now. all tests passed