How can I use the above function in a usefull way, as returning a valueble ref. to an other function?