first implementation of advanced search