fixed two small bugs (Arrays.copy doesnt exist replaced with loop and StringBuffer has no add-Method)