final implmented main class