refactoring some elements