Implementation 2 is now working for padding with character