refactoring last few cast messages