fixed main.c boolean function for clarity