removed code redundancies