both directions working. need to handle intermediates and remove bad state.