add some const correctness