simplify code
edit comments