fixed table settings, wrote some tests