fix duplicate function.