first version for table initialization

probably broken