put ctx class first before msg class