reworked the way locations are stored