private static String padLeft(String input, int lenght, char pad) {
        StringBuilder result = new StringBuilder(input);
        while (result.length() < lenght) {
            result.insert(0, pad);
        }
        return result.toString();
    }