Disentangling moral hazard and adverse selection