updated to match chromes implementation
Merge pull request #5 from matt-wratt/master

updated to match chromes implementation