main OG class takes important parameters in constructors
refactored code to avoid duplication