Motivated by Stanley's conjecture about the e-positivity of claw-free incomparability graphs, Hamel and her collaborators studied the e-positivity of (claw, H)-free graphs, where H is a four-vertex graph. In this paper we establish the e-positivity of generalized pyramid graphs and 2K 2 -free unit interval graphs, which are two important families of (claw, 2K 2 )-free graphs. Hence we affirmatively solve one problem proposed by Hamel, Hoàng and Tuero, and another problem considered by Foley, Hoàng and Merkel.