added caching and with 3 topologies