Todo, adapted to newest libs