Added necessary functions/tables

fixed one of the tests