for easy understand the java code