move replace to parser