improve encoding of side constraint