wrote writeToLog, not sure if these are gonna work