added some comments, int -> unsigned int