Using more efficeint way of looking up bugs