fixed the getBody function