Added template function called interface_cast