finish whole program--first draft