adding tf functionality