added getedgeaction to motiongraph and fixed isvalidstate