initial commit : new code after refactoring