Changed pointer into references