fixed Locations API and validated Facilities function