moved javascript to assets and fixed the occurences and updated bug