fixed structs in header
added destroy functions