modified test code
cleanup and shrink