Righteous deeds have three components. Performing sacrifices, studying and giving alms constitute the first strand. Meditation is the second strand. Studying in the house of one's teacher is the third strand. All such righteous people are destined for the most sacred of world. But he who worships the brahman becomes immortal.
(this is a reference to the four stages of life (ashrama). The first is that of celibate student hood (brahmacharya), when one studies at the house of one's teacher. The second is the householder stage (garhasthya), when one performs sacrifices, studies the Vedas and gives alms. The third is the forest dwelling stage (vanaprashta), when one retires to the forest and meditates. And the fourth and final stage is that of becoming a hermit (sannyasa), when one contemplates the brahman.)