refactored joke process