Change some method to handle two table.