trying out CACHE instead of dealing with parent scopes
creating dart wrapper code