table output now working