updated latex for problems 4 and 2