encapsulate module fields in a class