added params to search function