Modularized program by adding separate functions for each condition.
Variables store the return of each check which we can use for
comparison afterwards