add const qualifier where appropriate