sai logic