modified problems 1 & 2