added const qualifiers to new functions, apparently this makes them easier for other functions to call