simplify code.