edit searchAction to be able to retrieve entities from database