Now works with the chrome extension code