fix duplicate functions