some code for java