ended up with more test code than production :)