changed js to load data