reorganizing so that it's easy to copy to other projects