Added some code for browser usage