fixed logic completed.