add tests, patch holes, use tixxit's suggestions