move user-finding logic out of command