small code changes after self-review ;)