added reference.ts support