added coding challenge 4A
added condition to if, all tests passed