fix DRY violations