puzzle semi-functional. has some bugs.