delete first and last lines