Added renderBody function