light refactoring against copy-paste