adding a working add_sma