add const keywords to some functions