start to implement better domain handling in state class