added message helper
moved transform data logic to helper