making elements work in table() method