added LaTeX writeup and better plotting