refactored java code
added background image for plotting