added struct functions