simplify code more