[MOD] code refactoring