full coverage and some code changes