added insert method, and tests now run in the browser