function end behavior