structurised file and functions