refactored several methods, eliminated whitespace