[OE-2936] refactored js for new loading method