more progress on DFT branch