resolved issue 1 - recersed the if case