Small Change
Updated to include the possibility of 1 times the function.

Ran it a few times and there were no bugs, but I'm unsure if I missed
something. It looks good, though.