Added tests for the updated main method