moving to all js code