finishing first draft of assign_internal