support custom client state class