fixes and tests for 100% passing coverage