get motifs from genrep, fix bugs in motifs.py