removed System.out and extra lines added for debugging.