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

updated to match chromes implementation