initial table logic works