java syntax should be better