Solved problem 11 after a bit of typing and headscratching