trying to use states of map