this example is in ts