better reference passing