structure defintions and methods declared