If you replace " AND " with "&&" then your program will be slightly faster, because && will short circuit