modified to retain original positioning when original containers are available