bringing var back to js code