add global variable for js access