Adding motif and bug correction