Use unsafe package to do a type cast