move loging for generatoring next state to... state