using tensor library