encapsulate dataset functions to scriptsw