added const to the code