improved delimiter handling