adds rudimentary tests, more helpers