addressed some code review comments
even more code review