worked on problem 12 a little, verrrrry bad algo