standardized start stop and restart function