added funcionality for getting table