simplify my code