added tie condition