implemented and tested diff graph