add type function to coerse data