refactor elements