convert graph and set to coffeescript