prepare a simple implementation for an RNN using plain typescript