add comments, rename var