avoid duplicate code in activate module