Updated for DZGM - was missing a piece of code