update to work with new browser api