Profit-sharing contracts with moral hazard and adverse selection