reorganizing and rewriting