added init functions to add tables if needed