Actually removed while loop, actually added nth func.