finsihed separating code