added min and max year as parameters