refactoring common components