renamed to sharedfuncs