added length validation and wrapped name with h method