Promoting cooperation in a commons dilemma