New methods added: Testing in main method and in junit. Completed