fixed catter script to add document type