created closed framework and did refactoring