changed to using topology