graph functional implemented