make toJava public