Still has bugs on defining the number of pad bits