Added more constraints and obj function