added remaining structs and psuedo code in main