correct database search