added cast receiver code, demo