Remove duplicate function