procedure workin' and endLine of functions