minor modifications after code review