improving sed command