Removed type cast function