refactor can_comment detection