added some simple functions such as join_table etc