added tie conditions