Program works, still need to fix when trying to write values.