refactor to common components