create getBody method on prototype