improve function finder