added loading mechanism