Defined searchTask function in Logic class