and i should be an int, not unsigned int :) I always use u for unsigned.