Adapted to new libraries