optimize search for machine with location