started second algorithm