reverted to rawbody and added errors checks