fixed up some issues with creating structure