updated to only check 2 and odd numbers