Problem 4 proposed solution
minor change in a test conditionw