Start stop and restart function.