changed logical operator in line 108 from short-circuit AND ( &&)  to AND(&)