A version that works, changed padding
added apache.commons