Got algorithm working wfor no hair attribute