Need to finish loops, but all other functions work.