- added test
- fixed implementation