handle states also when we are selecting multiple