improving/changing syntax
Fixing SMA calculation