added generate first method