suggestion: change the 'if and else ' to 'unless'.