Do ex 10 with some extra credit tweaks