Remove duplicate code again