moved assembly functionality up