made get_latency ignore cells without peaks inside given bound and that it choses the first peak if there are two equal max peaks