removes unneeded refer