minor changes due to codereview