solution before the deadline - and some tests.