added const qualifiers where needed