added restart function