add waiting for js elements to be loaded