more refactorring