update code for browser detector