(#3282) - general refactor