moved message wrapper into own c file