some tools for twisted