add the rest part of ltable.c