cleaned up formateResponse function implementation and added method to single task responses that were missed in DELETE and getById