adding compile function to ann graph