loadFn

adding loadFn and tests