working update, working on memory leak now