Introduced dynamic loading in loadFunction