newClass function now secures static methods