enhanced prefix handling