started dividing up code.