fixed logic within class