removed code redundancies.