fixed tables, added system test