2nd part refactoring