add some pre-conditions to update + search + sort functions