Changed input to a const ref