added code for spawning several apartments simultaneously