Could someone look at this simple code and explain why it doesnt work?