remove reliance on sed