add tests, adjust commenting