with restart function