optimizing locations