support search by reference (fixes #7)