dry my code