fix comments, refactor