java 6 string manipulation is gross