Using more structs and functions