Further improves function determination