used -E for compatability with BSD sed