delete duplicate function