fixed all issue and refactor is complete