change to use java custom