modify halfSearch