added optional term input
hopefully resolved merge errs