refactoring prev commit