Replaced const reference with pointer