Implemented main