implemented dynamic search