Using substring expression instead of sed

because we can!