changed deprecated dynamic loading logic to new one