fix browser code to kind of work