cleanup dumb syntax and pass by const ref