replace_unit

draft of replace_unit