correct return type to unsigned to remove some compilation messages