adapt code to new JTable