changed non-standard C++ from "or" to ||