updates based on pr discussion.