combined the forces in the loop to make it faster.
Merge branch 'master' of github.com:h-wang94/cs184final
small minor changes