remove duplicate function