Resolve code review comments

suggestion by @portertech for code quality