added composite terminate function