everything working after pulling to top of class, now to extract into own classes and require