Use refereces instead of pointers