done some code cleanup