fixing eferences mostly