fixing little stuff. new persist stuff
fixing persist function
fixing persist function...again. forgot to close file