Re-implement shirking function from paper