we can now calculate the next state