fixes #1 - const correctness issue