[change HashSet to ArrayList][Q9.11]parenthesize boolean expression