cleaned up static variables and put into an enclosing class instead