updated with suggestions
test coverage expanded and integrated comment changes