Slightly faster logic