add composite pattern to location model