migrated old learn-java code