Use data type

Re-opening this PR because I merged it prematurely and then backed out of the merge.