Refactored reduncdant code. CTB 10_2_13