simplify code block