Pass by const ref instead of by value