finish one methond for regex graph