uncommented the asserting conditions which was commented for testing purposes.