Added if statement to test program