new structures and added functions