adding rest API test; making graph implementations polymorph