Actually, I have already built this functionality. It was more of a (for everyone else) sort of post.