revised elements.py