loader seems to work, need to update code generator to create function code