refactoring code , use WebComponent concept.