removed for loop to while in = overload