Main class implemented