delete code repetition