refactoring + initial setup extract()