Solved the square() after much contemplation. Interesting problem.