Added contraints and sub-goals for first problem.