Added code for LAI control