small refactoring to get rid of resharper warning