add in states
fix tests