boolean function

Calls the boolean function in main and finishes the if statements in the boolean function.