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

updated to match chromes implementation