Remove duplicate logic