Extracting divisibiliy checks into variables