updated to handle last month emi