added some java code to play with