changed th to td and added boolean dictionary