last 2 function