getElement method changed