improve search; add argument handling