adjusting javascript loading