a little of refactoring/comments