predicate and clearer methods, avoid global vars