making a proper table and json printer for list