adapted to latest lucid