copied footer code into MASTER