improved transferring form data to java program