Recoded my boolean function to include a boolean comparison and a returnable variable