common loading function fixed #15