SMA upgrade
final version