reworked everything (yet again), now is more functional
updated tests and documentation