Remove duplication function def