added the motif loop