added search boundary code