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

updated to match chromes implementation