added if else statement for body of html