First pass at solving.