updated prem transaction function