more comments, refactoring