added graph analysis stuff, setup of coord systems