fix tbody loop, add edit and delete