finalized search functionalities