Delete old function that returned array