Getting rid of unused reference function