implemented lookup func for hamsearch