Made functions pass by reference