fix POST request and update tests