made CompositeRestraint faster