connect top and bottom
use for-loop