tuning selfishness code