updated model fitting by adding set seed 999