fix Content-Type and status code. add more tests