added "System.out.println("sorted array:");" to insertion too