fixed main method, and added readline