created function for finding strongest ir signal