select map to table works