Besides the issues I mentioned above, the code looks like it should work.