add const to appropriate functions