added ability of functions to bind locals