remove extra ref and stuff