some improvements with custom elements