version 1.2 with main method and displayed in the console