updated prem transact function