wip adding code to work in browser