remove redundant function heads