1 test passing & code ugly

todo:
- refactor
- extensive tests
- documentation
- test configuration