^ this check could be made before the loop because it doesn't depend on the loop variable