adding top bottom loop