working 3 states and styled