add duplicate function to form