Created new_local function for creating locals