updating to use attachListeners instead of passed runtime