Created pmt() function