some modifications for tutorial2