added single main method for command line execution
make everything lazy