utilized String.split() more efficiently