proper classes now, less repetition
added changes from redo of part 1