renamed globalstate to state
removed explicit weight from edge list