Can you please add a comment for each state, explaining which purpose does it serve?