finished the first version of local sim for labstudy using ted