change command "tail" to "sed"