group contract by contract type