defined a class with a method, called it from main
input output of public variables