small clean up code for state builder