add table contains function

added a function that returns true if the table contains a given key