Updated to work with proper struct as incoming data.