refactor
browser part is working