set up background java code
new version