final newline refactor