finished all specced methods and tests
made browser compatible