working sampling dict2dto3d method