add scale as global var, debug rmzeropadding