pytwi prototype