added example, updated so that it actually works