replaced many code