added Stan code