updated with advanceSearch - needs to be tested