Add length property to Compound class