refactoring previouce change