finished removing twisted-based code