fix comments and edge case
refactor