tweak code, use reference, const, etc.