cleaning up, fixing table bug