Added type-casting functions