all hooks ported except ds_*