done with java interop