work with older versions of sed