working on the baseStation optimization algorithm