exiting code if condition is met