add comment to explain the helper function