modified all the test without testing the main and added more javadoc