add const to cast