change layout of data structure to be map vector vector rather than map map vector vector, states function completly unfinished