referans functions fixed