working  not refactoring version