ticket:4 function for context proc