renaming the toCompound() method