moved preparing methods inside elements