update for review comments and fix one failing test