add table contains function

added a fucntion that returns true if the table contains the key