Final Project (write not working for some reason)