added functions to initialize structures