Updated STUDsl democode