Mechanism design for general screening problems with moral hazard