datadefs and initialisation routines