Compiles, but looks somewhat evil and ugly. Refactor.
made working locations storage.