Added thread for explicitly chaining functions.