added a check to sed