changed js for browser security