first working version. the sum symbol is working, but has some bugs.