Implementation and example