added some structs/functions