adapted to the current framework