(bluefox) implement restart function