reworked tests, corrected errors