fixed commenting and try-with-resources