fix bug; remove state keyword from example