simplify codes