refactor element dimensions