implemented own method to construct modules
removed dependency on enum module