updated exampel implementation