changes to safeguard search, add and remove.