Implementation and simple functional test