moved structure definitions into header