Add pocket detection