Added more reference passing