buggy implementation v0.1
implementation v0.2 - with testAdditional