This is cool. didn't know you could do this in java