added example and extended documentation