A large portion of elements surrounding us are produced in fusion reactions in stars. However, elements heavier than iron require more complex processes taking place in a variety of astrophysical environments to be produced. Modeling these processes requires knowledge on properties of the nuclides taking part in the reactions, such as atomic mass. In this talk, mass measurements in the rare-earth region and near the N=Z line performed recently at the University of Jyväskylä using JYFLTRAP double Penning trap will be presented. The masses of 27 nuclear ground states heavier than iron and three long-lived isomeric states were measured. Out of them 16 masses were measured for the first time. Implications of the new data on the modeling of the astrophysical r-process and on nuclear structure will be discussed. Additionally, technical development of the experimental set-up as a part of the measurement campaigns will be presented.