implemented main module