This is upenn's internal implementation of metridoc