read implemented, groundwork done, bad memory leaks