add revised tests;change graph representation