done with js running in java