working on state select functionality