drifts.cpp improved