code clean up close issues #8