Create make table function