trying to organize rendering of table