use append, join and extend instead of +=