tok: updated rendering logic