more graph stuff implemented, some tests