rewrite: get tests working as expected (for real this time) and add a few more