Got function to work, now adding a save option for my app.