is that all of the code? if not, you are missing a few lines.