calculate current state