functioning version

left for loop to leave option of adding more functionality