PE 4.38
changed 2nd "if" to "else if"