adjust function because library function renderTable was changes and now returns text instead of echoing data to browser
adding dynamic button to table output