some issues with implementation of reference.d.ts