Adding restart function