fix race, add examples