implemented graph animation