simplify code struct