tRex code added