WORK IN PROGRESS: merge 3 meta dsata functions into one