added a line break in the big summation statement.  also added a curly brace to close off a for loop