is there a better way to do this? - tRPC