added sma - still broken