changed all kinds of pointers and copies to references