updated to use the new vectors in the state object