changed js for browser sequirity