aded pointers, made some changes to control structures and structs