added const for correctness