added standalone mode