done some fixes from code review