got rid of the try/catch even though it was more efficient and easier to
read then the convoluted way of using regex in java