some changed to do_padding