changes

changed states[][] to vector for consistency
states[][] are not updated on rowfilled and resets