mainly design - code needs real clean up and refactoring