https://stackoverflow.com/questions/11514688/passing-const-pointer-by-reference