reversed logic to make code cleaner
adjusted comment