could probably just do this in one line, assigning a test of the value to the state