move conditional not to check on every loop