#5272: fix and refactoring methods