updated with new Chrome extension code