switched to elements instead of chars