modified tests
reworked whole module
reworked whole module
reworked spec tests
removed some small bugs